/**
 * 特勤处排行榜样式
 */

/* 主容器 */
.special-operation-ranking {
  --ranking-primary-color: #e6a23c;
  --ranking-success-color: #67c23a;
  --ranking-warning-color: #e6a23c;
  --ranking-error-color: #f56c6c;
  --ranking-info-color: #409eff;
  
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --border-radius-large: 12px;
  
  width: 100%;
  min-height: 100vh;
}

/* 页面标题 */
.ranking-header {
  background: var(--n-card-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}

.ranking-header .n-icon {
  color: var(--ranking-primary-color);
}

/* 筛选器样式 */
.ranking-filters {
  margin-bottom: 20px;
}

.ranking-filters .n-card {
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
}

.filters-content {
  width: 100%;
}

.desktop-filters .n-grid {
  width: 100%;
}

.filter-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--n-border-color);
}

/* 排行榜列表样式 */
.ranking-list {
  width: 100%;
}

.list-container {
  width: 100%;
}

.ranking-item {
  margin-bottom: 12px;
  border-radius: var(--border-radius-large);
  overflow: hidden;
  transition: all 0.3s ease;
}

.ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

/* 排行卡片样式 */
.ranking-card {
  width: 100%;
}

.item-card {
  border-radius: var(--border-radius-large);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.item-card:hover {
  box-shadow: var(--card-shadow-hover);
}

/* 排名徽章样式 */
.rank-badge {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.rank-first {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #b45309;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  animation: pulse-gold 2s infinite;
}

.rank-second {
  background: linear-gradient(135deg, #c0c0c0 0%, #e5e7eb 100%);
  color: #374151;
  box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
}

.rank-third {
  background: linear-gradient(135deg, #cd7f32 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(205, 127, 50, 0.4);
}

@keyframes pulse-gold {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.6);
  }
}

/* 物品信息样式 */
.item-info {
  width: 100%;
}

.item-header {
  margin-bottom: 12px;
}

.item-image {
  position: relative;
}

.grade-indicator {
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.item-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* 数据网格样式 */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  width: 100%;
}

.data-item {
  padding: 8px;
  background: var(--n-color-target);
  border-radius: 6px;
  border: 1px solid var(--n-border-color);
  transition: all 0.2s ease;
}

.data-item:hover {
  border-color: var(--n-primary-color);
  background: var(--n-primary-color-suppl);
}

.data-item.highlight {
  background: linear-gradient(135deg, var(--n-success-color-suppl), var(--n-success-color-pressed));
  border-color: var(--n-success-color);
  box-shadow: 0 2px 8px rgba(103, 194, 58, 0.2);
}

.data-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--n-text-color-3);
  margin-bottom: 4px;
}

.data-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--n-text-color);
}

.data-value.profit {
  font-size: 16px;
  font-weight: 700;
  color: var(--n-success-color);
  text-shadow: 0 1px 2px rgba(103, 194, 58, 0.2);
}

.unit {
  font-size: 11px;
  font-weight: 400;
  color: var(--n-text-color-3);
  margin-left: 4px;
}

/* 材料信息样式 */
.materials-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--n-border-color);
}

.materials-header {
  margin-bottom: 8px;
}

.materials-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.material-tag {
  transition: all 0.2s ease;
  cursor: pointer;
}

.material-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 分页器样式 */
.pagination-container {
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--n-border-color);
}

.pagination-info {
  font-size: 14px;
  color: var(--n-text-color-3);
}

/* 统计信息样式 */
.stats-section {
  margin-top: 24px;
}

.stats-section .n-card {
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
}

.stats-section .n-statistic {
  text-align: center;
}

/* 状态样式 */
.loading-container,
.error-container,
.empty-container {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--n-card-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .special-operation-ranking {
    padding: 0 4px;
  }
  
  .ranking-header {
    margin-bottom: 16px;
    padding: 12px;
  }
  
  .ranking-filters {
    margin-bottom: 16px;
  }
  
  .ranking-item {
    margin-bottom: 8px;
  }
  
  .ranking-item:hover {
    transform: none;
    box-shadow: var(--card-shadow);
  }
  
  .data-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .data-item {
    padding: 6px;
  }
  
  .data-value.profit {
    font-size: 14px;
  }
  
  .materials-list {
    gap: 4px;
  }
  
  .pagination-container {
    margin-top: 16px;
    padding: 16px 0;
  }
  
  .stats-section {
    margin-top: 16px;
  }
  
  .loading-container,
  .error-container,
  .empty-container {
    min-height: 200px;
  }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
  .special-operation-ranking {
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
  
  .data-item {
    background: rgba(255, 255, 255, 0.05);
  }
  
  .data-item:hover {
    background: rgba(255, 255, 255, 0.08);
  }
  
  .material-tag:hover {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
  }
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ranking-item {
  animation: fadeInUp 0.3s ease-out;
}

.ranking-item:nth-child(1) { animation-delay: 0.1s; }
.ranking-item:nth-child(2) { animation-delay: 0.2s; }
.ranking-item:nth-child(3) { animation-delay: 0.3s; }
.ranking-item:nth-child(4) { animation-delay: 0.4s; }
.ranking-item:nth-child(5) { animation-delay: 0.5s; }
